package com.ruyiadmin.springboot.service_layer.interfaces.system_interfaces;

import com.ruyiadmin.springboot.common_infrastructure.models.QueryResponseResult;
import com.ruyiadmin.springboot.entity_data_model.data_transformation_model.system_model.OrgUserTreeDTO;
import com.ruyiadmin.springboot.entity_data_model.data_transformation_model.system_model.SysOrganizationDTO;
import com.ruyiadmin.springboot.entity_data_model.entity_model.system_model.SysOrganization;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 机构表 服务类
 * </p>
 *
 * @author RuYiAdmin
 * @since 2022-07-12
 */
public interface ISysOrganizationService extends IService<SysOrganization> {
    /**
     * 加载组织机构缓存
     */
    void loadSysOrgCache();

    /**
     * 清理组织机构缓存
     */
    void clearSysOrgCache();

    /**
     * 查询机构列表
     *
     * @return QueryResult
     * @throws Exception 异常
     */
    QueryResponseResult<SysOrganizationDTO> getOrgTreeNodes() throws Exception;

    /**
     * 获取机构、用户树
     *
     * @return QueryResult
     * @throws Exception 异常
     */
    QueryResponseResult<OrgUserTreeDTO> getOrgUserTree() throws Exception;

}
